package cn.lvji.springboot.learn3.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.HttpRequestHandler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller("/myhttp")
public class TestHttpHandlerAdapter implements HttpRequestHandler {
    @Override
    public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String aa = request.getParameter("aa");
        response.getWriter().println("aa paramter is " + aa);
        response.getWriter().flush();
    }
}
